package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entry.UserAccount;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* @author 16040
* @description 针对表【user_account】的数据库操作Mapper
* @createDate 2022-04-22 14:24:41
* @Entity com.example.demo.entry.UserAccount
*/
@Repository
public interface UserAccountMapper extends BaseMapper<UserAccount> {

    List<UserAccount> selectByAccountAndPassword(@Param("account") String account, @Param("password") String password);

    Boolean register(@Param("account") String account,@Param("password") String password,@Param("name") String name,@Param("sex") String sex);

    List<UserAccount> checkAccountExist(@Param("account")String account);

    Boolean modifyInfo(@Param("name")String name,@Param("sex")String sex,@Param("age")int age,
                       @Param("phone")String phone,@Param("address")String address,@Param("account")String account);

}
